package com.ning.city.dto;

import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * @author Ning 242741154@qq.com
 * @date 2021/1/7 15:08
 */
public interface InfoDto {
    @Data
    class Add {
        @NotNull(message = "type 不能为空")
        private Integer type;
        @NotNull(message = "title 不能为空")
        private String title;
        @NotNull(message = "linkman 不能为空")
        private String linkman;
        @NotNull(message = "phone 不能为空")
        private String phone;
        @NotNull(message = "content 不能为空")
        private String content;
        @NotNull(message = "email 不能为空")
        private String email;
    }


    /**
     * PageInfo dto
     *
     * @author Ning 242741154@qq.com
     * @date 2021/1/7 10:31
     */
    @Data
    class PageInfo implements ThePageInfo {
        //        @NotNull(message = "页号不能为空")
        @Min(value = 1, message = "页号不能小于 1")
        private Integer pageNum = 1;
        //        @NotNull(message = "页面大小不能为空")
        @Min(value = 5, message = "页面大小不能小于 5")
        @Max(value = 20, message = "页面大小不能大于 20")
        private Integer pageSize = 10;
        private Integer InfoType;
        private String keyword;
    }
}
